{{ define "scripts" }}
<script type="text/javascript">
var disqus_shortname = '{{.DisqusId}}';
(function () {
    var s = document.createElement('script'); s.async = true;
    s.type = 'text/javascript';
    s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
    (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
{{ end }}


{{ define "content" }}
<div class="container">
    <h1>Recent Entries</h1>

    {{ if .Entries }}
      <table id="entries" class="table table-bordered table-striped">
        <thead><tr><th>Title</th><th>Edit</th><th>Comments</th><th>Date</th></tr></thead>
      {{ range .Entries }}
      <tr>
        <td>
          <a href="{{$.BaseURL}}{{.RelativeURL}}">{{.Title}}</a>
          {{ if .IsHidden }}<span class="glyphicon glyphicon-eye-close"></span>{{ end }}
        </td>
        <td><a href="edit?slug={{.Slug}}"><span class="glyphicon glyphicon-pencil"></span></a></td>
        <td><a class="comment_count" href="{{$.BaseURL}}{{.RelativeURL}}#disqus_thread"></a></td>
        <td>{{.RfcDate}}</td>
      </tr>
      {{ end }}
      </table>
    {{ else }}
    <p>No entries exist yet. Why not create one?</p>
    {{ end }}
    <a href="edit" class="btn btn-primary btn-large">Create!</a>
</div>

{{ end }}
